import { createRouter, createWebHistory } from 'vue-router'
import HomePage from '@/page/HomePage.vue'
import PersonalInfoPage from '@/page/user/PersonalInfoPage.vue'
import UserManagePage from '@/page/admin/UserManagePage.vue'
import AppManagePage from '@/page/admin/AppManagePage.vue'
import ChatManagePage from '@/page/admin/ChatManagePage.vue'
import AppChatPage from '@/page/app/AppChatPage.vue'
import AppEditPage from '@/page/app/AppEditPage.vue'
import HealthTestPage from '@/page/HealthTestPage.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: '主页',
      component: HomePage,
    },

    {
      path: '/user/profile',
      name: '个人资料',
      component: PersonalInfoPage,
    },
    {
      path: '/admin/userManage',
      name: '用户管理',
      component: UserManagePage,
    },
    {
      path: '/admin/appManage',
      name: '应用管理',
      component: AppManagePage,
    },
    {
      path: '/admin/chatManage',
      name: '对话管理',
      component:  ChatManagePage,
    },
    {
      path: '/app/chat/:id',
      name: '应用对话',
      component: AppChatPage,
    },
    {
      path: '/app/edit/:id',
      name: '编辑应用',
      component: AppEditPage,
    },
    {
      path: '/health',
      name: '健康检查测试',
      component: HealthTestPage,
    },

  ]
})

export default router
